﻿using Microsoft.AspNetCore.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FuelAbp
{
    /// <summary>
    /// SignalR Hub
    /// </summary>
    public class MyHub: Hub
    {
        public Task SendPublicMsg(string msg)
        {
            string connId = this.Context.ConnectionId;
            string msgTosend = $"{connId} {DateTime.Now}:{msg}";
            return this.Clients.All.SendAsync("PublicMsgReceived",msgTosend);
        }
    }
}
